<!doctype html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<div>
    <h1>Car index</h1>
    <p><a href="/home/index">back to home</a></p>
    <p><a href="/car/add">Add a new car</a></p>
    <div>
        <table>
            <thead>
            <tr>
                <th>ID</th>
                <th>品牌</th>
                <th>购买日期</th>
                <th>颜色</th>
                <th>型号</th>
                <th>名称</th>
                <th>功率</th>
            </tr>
            </thead>
            <tbody>
            <#list cars as car>
            <tr>
                <td>${car.id}</td>
                <td>${car.brand}</td>
                <td>${car.buyDate!}</td>
                <td>${car.color}</td>
                <td>${car.model}</td>
                <td><a href="/car/detail?id=${car.id}">${car.name}</a></td>
                <td>${car.power}</td>
            </tr>
            </#list>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>